import { _decorator, Component, Node } from 'cc';
import { EnemyFrameAnimType, EnemyFrameInfo } from '../Enemy/EnemyController';
import { FrameComponent } from '../FrameComponent';
const { ccclass, property } = _decorator;

@ccclass('RoleFrame')
export class RoleFrame extends FrameComponent {

    onChildInit() {
        let info: EnemyFrameInfo = new EnemyFrameInfo();
        info.animType = EnemyFrameAnimType.Idle;
        info.startIndex = 0;
        info.endIndex = 11;
        info.frameName = "Idle_";
        info.rootPath = "Frame/Player/Toweer/Idle";
        info.speed = 0.04;
        info.isLoop = true;
        this.frameInfoList.push(info);

        info = new EnemyFrameInfo();
        info.animType = EnemyFrameAnimType.Attack;
        info.startIndex = 0;
        info.endIndex = 14;
        info.speed = 0.02;
        info.isLoop = false;
        info.frameName = "Shooting_";
        info.rootPath = "Frame/Player/Toweer/Shooting";
        this.frameInfoList.push(info);
    }
    
}


